package net.maxwoods.nimble.spring.security;

import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

public class CustomAuthenticationToken extends AbstractAuthenticationToken {

    private Object principal;

    private Object credentials;

    @Override
    public Object getPrincipal()
    {
        return principal;
    }

    @Override
    public Object getCredentials()
    {
        return credentials;
    }

    public CustomAuthenticationToken(Object principal,Object credentials,Collection<? extends GrantedAuthority> authorities)
    {
        super(authorities);
        this.principal=principal;
        this.credentials=credentials;
    }
}
